package Employees;

public class main {
    public static void main(String[] args) {
        Employee[]employees=new Employee[6];//定义员工数组
        employees[0]=new SalariedEmployee("陈予琛",5000.0);//调用SalariedEmployee函数
        employees[1]=new SalariedEmployee("商广明",6000.0);
        employees[2]=new SalariedEmployee("孙钺嘉",3000.0);
        employees[3]=new HourlyEmployee("赵钰然",6,250);//调用HourlyEmployee函数
        employees[4]=new HourlyEmployee("杨艾伦",8,200);
        employees[5]=new HourlyEmployee("郭乐妍",12,100);
        for(int i=0;i<6;i++){
            System.out.println("姓名："+employees[i].name+"，工资："+employees[i].calculateSalary());//输出数组
        }
    }
}
